3.43 \(\int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^3 \, dx\)

Optimal. Leaf size=140 \[ -\frac {2 a^3 c^3 \tan ^5(e+f x)}{5 f (a \sec (e+f x)+a)^{5/2}}+\frac {2 a^2 c^3 \tan ^3(e+f x)}{3 f (a \sec (e+f x)+a)^{3/2}}+\frac {2 \sqrt {a} c^3 \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{f}-\frac {2 a c^3 \tan (e+f x)}{f \sqrt {a \sec (e+f x)+a}} \]

[Out]

2*c^3*arctan(a^(1/2)*tan(f*x+e)/(a+a*sec(f*x+e))^(1/2))*a^(1/2)/f-2*a*c^3*tan(f*x+e)/f/(a+a*sec(f*x+e))^(1/2)+
2/3*a^2*c^3*tan(f*x+e)^3/f/(a+a*sec(f*x+e))^(3/2)-2/5*a^3*c^3*tan(f*x+e)^5/f/(a+a*sec(f*x+e))^(5/2)

________________________________________________________________________________________

Rubi [A]  time = 0.17, antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3904, 3887, 302, 203} \[ -\frac {2 a^3 c^3 \tan ^5(e+f x)}{5 f (a \sec (e+f x)+a)^{5/2}}+\frac {2 a^2 c^3 \tan ^3(e+f x)}{3 f (a \sec (e+f x)+a)^{3/2}}+\frac {2 \sqrt {a} c^3 \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{f}-\frac {2 a c^3 \tan (e+f x)}{f \sqrt {a \sec (e+f x)+a}} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + a*Sec[e + f*x]]*(c - c*Sec[e + f*x])^3,x]

[Out]

(2*Sqrt[a]*c^3*ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]])/f - (2*a*c^3*Tan[e + f*x])/(f*Sqrt[a +
 a*Sec[e + f*x]]) + (2*a^2*c^3*Tan[e + f*x]^3)/(3*f*(a + a*Sec[e + f*x])^(3/2)) - (2*a^3*c^3*Tan[e + f*x]^5)/(
5*f*(a + a*Sec[e + f*x])^(5/2))

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 302

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 3887

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_.), x_Symbol] :> Dist[(-2*a^(m/2 +
 n + 1/2))/d, Subst[Int[(x^m*(2 + a*x^2)^(m/2 + n - 1/2))/(1 + a*x^2), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c +
d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && IntegerQ[n - 1/2]

Rule 3904

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.), x_Symbol] :> Di
st[(-(a*c))^m, Int[Cot[e + f*x]^(2*m)*(c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x]
&& EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] &&  !(IntegerQ[n] && GtQ[m - n, 0])

Rubi steps

\begin {align*} \int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^3 \, dx &=-\left (\left (a^3 c^3\right ) \int \frac {\tan ^6(e+f x)}{(a+a \sec (e+f x))^{5/2}} \, dx\right )\\ &=\frac {\left (2 a^4 c^3\right ) \operatorname {Subst}\left (\int \frac {x^6}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=\frac {\left (2 a^4 c^3\right ) \operatorname {Subst}\left (\int \left (\frac {1}{a^3}-\frac {x^2}{a^2}+\frac {x^4}{a}-\frac {1}{a^3 \left (1+a x^2\right )}\right ) \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=-\frac {2 a c^3 \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}+\frac {2 a^2 c^3 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^3 c^3 \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}-\frac {\left (2 a c^3\right ) \operatorname {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=\frac {2 \sqrt {a} c^3 \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}-\frac {2 a c^3 \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}+\frac {2 a^2 c^3 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^3 c^3 \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.19, size = 111, normalized size = 0.79 \[ \frac {c^3 \tan \left (\frac {1}{2} (e+f x)\right ) \sec ^2(e+f x) \sqrt {a (\sec (e+f x)+1)} \left ((22 \cos (e+f x)-23 \cos (2 (e+f x))-29) \sqrt {\sec (e+f x)-1}+30 \cos ^2(e+f x) \tan ^{-1}\left (\sqrt {\sec (e+f x)-1}\right )\right )}{15 f \sqrt {\sec (e+f x)-1}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + a*Sec[e + f*x]]*(c - c*Sec[e + f*x])^3,x]

[Out]

(c^3*(30*ArcTan[Sqrt[-1 + Sec[e + f*x]]]*Cos[e + f*x]^2 + (-29 + 22*Cos[e + f*x] - 23*Cos[2*(e + f*x)])*Sqrt[-
1 + Sec[e + f*x]])*Sec[e + f*x]^2*Sqrt[a*(1 + Sec[e + f*x])]*Tan[(e + f*x)/2])/(15*f*Sqrt[-1 + Sec[e + f*x]])

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 347, normalized size = 2.48 \[ \left [\frac {15 \, {\left (c^{3} \cos \left (f x + e\right )^{3} + c^{3} \cos \left (f x + e\right )^{2}\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right ) - 2 \, {\left (23 \, c^{3} \cos \left (f x + e\right )^{2} - 11 \, c^{3} \cos \left (f x + e\right ) + 3 \, c^{3}\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )}{15 \, {\left (f \cos \left (f x + e\right )^{3} + f \cos \left (f x + e\right )^{2}\right )}}, -\frac {2 \, {\left (15 \, {\left (c^{3} \cos \left (f x + e\right )^{3} + c^{3} \cos \left (f x + e\right )^{2}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) + {\left (23 \, c^{3} \cos \left (f x + e\right )^{2} - 11 \, c^{3} \cos \left (f x + e\right ) + 3 \, c^{3}\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )\right )}}{15 \, {\left (f \cos \left (f x + e\right )^{3} + f \cos \left (f x + e\right )^{2}\right )}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))^3*(a+a*sec(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

[1/15*(15*(c^3*cos(f*x + e)^3 + c^3*cos(f*x + e)^2)*sqrt(-a)*log((2*a*cos(f*x + e)^2 - 2*sqrt(-a)*sqrt((a*cos(
f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e) + a*cos(f*x + e) - a)/(cos(f*x + e) + 1)) - 2*(23*c^3*co
s(f*x + e)^2 - 11*c^3*cos(f*x + e) + 3*c^3)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sin(f*x + e))/(f*cos(f*x +
 e)^3 + f*cos(f*x + e)^2), -2/15*(15*(c^3*cos(f*x + e)^3 + c^3*cos(f*x + e)^2)*sqrt(a)*arctan(sqrt((a*cos(f*x
+ e) + a)/cos(f*x + e))*cos(f*x + e)/(sqrt(a)*sin(f*x + e))) + (23*c^3*cos(f*x + e)^2 - 11*c^3*cos(f*x + e) +
3*c^3)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sin(f*x + e))/(f*cos(f*x + e)^3 + f*cos(f*x + e)^2)]

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))^3*(a+a*sec(f*x+e))^(1/2),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (2*pi/x/2)>(-2*pi/
x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check si
gn: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check si
gn: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check si
gn: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)-2*(2*((-4/3*sqrt(
2)*a^3*c^3*sign(cos(f*x+exp(1)))+37/30*sqrt(2)*a^3*c^3*sign(cos(f*x+exp(1)))*tan(1/2*(f*x+exp(1)))^2)*tan(1/2*
(f*x+exp(1)))^2+1/2*sqrt(2)*a^3*c^3*sign(cos(f*x+exp(1))))/sqrt(-a*tan(1/2*(f*x+exp(1)))^2+a)/(-a*tan(1/2*(f*x
+exp(1)))^2+a)^2*tan(1/2*(f*x+exp(1)))+1/2*a*sqrt(-a)*c^3*sign(cos(f*x+exp(1)))*ln(abs(2*(sqrt(-a*tan(1/2*(f*x
+exp(1)))^2+a)-sqrt(-a)*tan(1/2*(f*x+exp(1))))^2-4*sqrt(2)*abs(a)-6*a)/abs(2*(sqrt(-a*tan(1/2*(f*x+exp(1)))^2+
a)-sqrt(-a)*tan(1/2*(f*x+exp(1))))^2+4*sqrt(2)*abs(a)-6*a))/abs(a))/f

________________________________________________________________________________________

maple [B]  time = 1.75, size = 302, normalized size = 2.16 \[ -\frac {c^{3} \sqrt {\frac {a \left (1+\cos \left (f x +e \right )\right )}{\cos \left (f x +e \right )}}\, \left (15 \sin \left (f x +e \right ) \sqrt {2}\, \left (\cos ^{2}\left (f x +e \right )\right ) \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{1+\cos \left (f x +e \right )}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \left (-\frac {2 \cos \left (f x +e \right )}{1+\cos \left (f x +e \right )}\right )^{\frac {5}{2}}+30 \sin \left (f x +e \right ) \sqrt {2}\, \cos \left (f x +e \right ) \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{1+\cos \left (f x +e \right )}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \left (-\frac {2 \cos \left (f x +e \right )}{1+\cos \left (f x +e \right )}\right )^{\frac {5}{2}}+15 \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{1+\cos \left (f x +e \right )}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \left (-\frac {2 \cos \left (f x +e \right )}{1+\cos \left (f x +e \right )}\right )^{\frac {5}{2}} \sin \left (f x +e \right )-184 \left (\cos ^{3}\left (f x +e \right )\right )+272 \left (\cos ^{2}\left (f x +e \right )\right )-112 \cos \left (f x +e \right )+24\right )}{60 f \sin \left (f x +e \right ) \cos \left (f x +e \right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c-c*sec(f*x+e))^3*(a+a*sec(f*x+e))^(1/2),x)

[Out]

-1/60*c^3/f*(a*(1+cos(f*x+e))/cos(f*x+e))^(1/2)*(15*sin(f*x+e)*2^(1/2)*cos(f*x+e)^2*arctanh(1/2*(-2*cos(f*x+e)
/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)/cos(f*x+e)*2^(1/2))*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(5/2)+30*sin(f*x+e)*2^(1/
2)*cos(f*x+e)*arctanh(1/2*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)/cos(f*x+e)*2^(1/2))*(-2*cos(f*x+e)/(
1+cos(f*x+e)))^(5/2)+15*2^(1/2)*arctanh(1/2*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)/cos(f*x+e)*2^(1/2)
)*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(5/2)*sin(f*x+e)-184*cos(f*x+e)^3+272*cos(f*x+e)^2-112*cos(f*x+e)+24)/sin(f*x
+e)/cos(f*x+e)^2

________________________________________________________________________________________

maxima [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))^3*(a+a*sec(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^3 \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a/cos(e + f*x))^(1/2)*(c - c/cos(e + f*x))^3,x)

[Out]

int((a + a/cos(e + f*x))^(1/2)*(c - c/cos(e + f*x))^3, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - c^{3} \left (\int 3 \sqrt {a \sec {\left (e + f x \right )} + a} \sec {\left (e + f x \right )}\, dx + \int \left (- 3 \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{2}{\left (e + f x \right )}\right )\, dx + \int \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{3}{\left (e + f x \right )}\, dx + \int \left (- \sqrt {a \sec {\left (e + f x \right )} + a}\right )\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))**3*(a+a*sec(f*x+e))**(1/2),x)

[Out]

-c**3*(Integral(3*sqrt(a*sec(e + f*x) + a)*sec(e + f*x), x) + Integral(-3*sqrt(a*sec(e + f*x) + a)*sec(e + f*x
)**2, x) + Integral(sqrt(a*sec(e + f*x) + a)*sec(e + f*x)**3, x) + Integral(-sqrt(a*sec(e + f*x) + a), x))

________________________________________________________________________________________